home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
telecomm
/
sticpsrc.lzh
/
DOC
/
ATARI.ARC
/
ATARI.TXT
< prev
Wrap
Text File
|
1988-07-15
|
12KB
|
283 lines
NET and BM ported to the Atari ST
by R.E. Janssen, PE1CHL.
The NET and BM programs have been ported to the Atari ST series
of computers. All models of the ST series (260, 520, 1040 and
MEGA) are basically the same, and the programs should run on all
versions, both with TOS in RAM, and the original or the "blitter
TOS" in ROM. The programs have been compiled using Mark Williams
C version 2.1.7. Other compilers require quite some changes to
many modules, so I recommend sticking with MW if you want to
recompile the package.
Changes made when porting to the Atari ST
- Because the Atari ST is sold with the GEM Desktop as the
primary user interface, no "standard" command processor
exists that can be called from NET and BM when a subshell is
requested. However, several command processors exist, both
available commercially and in the public domain. Therefore,
a variant of the "shell" command has been implemented in
NET, that allows you to set the pathname of the program to
be executed as a command processor. The syntax is:
shell =pathname
This statement can be included in the autoexec.net file.
Example:
shell =c:\toolkit\command.tos
No equivalent syntax has been built in BM, I thing the
configuration file access routines should be made somewhat
more sophisticated, before adding too many optional
reconfiguration commands. Work still to be done...
- This implementation only knows about "asy" hardware. 2
ports are defined, one being the RS232 serial port, and the
other the MIDI serial port. Both can be used for KISS or
SLIP links.
The RS232 port can be attached with:
attach asy 0 0 ax25 ax0 2048 256 9600
This attaches the port for ax25 (KISS) operation, as device
ax0, with a 2048byte buffer, an MTU of 256, and a baudrate
of 9600 bauds.
The RS232 port is accessed using "hardware address" 0. This
does not represent the physical location of the chip, but
rather the device number used in the Atari Iorec() call...
Valid baudrates are 300, 600, 1200, 1800, 2000, 2400, 3600,
4800, 9600 and 19200 bauds.
The MIDI port can be attached with:
attach asy 2 0 ax25 ax1 2048 256 9600
This port uses the same parameter structure as the RS232
port attach command. The "hardware address" is 2.
Some restrictions apply to the usage of this port:
- The baudrate is only settable to 7812 or 31250 bauds. A
simple hardware modification makes it possible to
change this to 9600 or 38400 bauds, but the software
can't tell the difference, so it will blindly accept
all 4 mentioned values for the baudrate, assuming that
you installed the mod if you specify 9600 or 38400.
- Of course, the interface on this port is a 5mA current
loop, so you will need an external conversion circuit
if you want to connect this to an RS232 TNC. Please
note, that "current ON" on the midi port corresponds to
a positive voltage on the RS232 pins, this is reverse
from "normal" current loop operation as used with
teleprinters and the like.
- The transmit routine on this port does not use
interrupts, but it busy-waits for each character in a
frame. This is because the interrupt handler for the
serial chip used on MIDI is shared with the
keyboard/mouse interrupt handler, and it does not
support transmitter interrupts....
The MIDI port CAN be used to link two STs using SLIP, and no
hardware mods are necessary. Only connect 4 wires between
the MIDI ports on the machines (from MIDI IN to MIDI OUT and
vice versa) and use the following attach command:
attach asy 2 0 slip sl0 4096 576 31250
- End-of-line conventions. Some extra work has gone in
attempts to correct the end-of-line sequences generated by
the RECORD commands form AX.25 and TELNET, and the ASCII
type file transfer from FTP. As observed by Phil, the whole
mess of CR/LF handling has been neatly avoided by UNIX, but
we poor souls using MS-DOS (or Atari TOS) need to solve the
problem in some way. On the Mark Williams compiler for the
ST, the default open mode for files is "text mode", and in
this case all \n characters get translated to CR/LF pairs in
the file, and vice-versa. This means that writing CR/LF in
text mode results in CR/CR/LF in the file. You can open the
file in "binary mode" (using "wb" in the fopen call), and
the characters will be written untranslated. This seems to
be more like the behaviour of Aztec C, so I used the binary
mode as a temporary fix for the problems with RECORD mode,
but this should really be fixed in the code at the
appropriate place. I did some work in the code for AX.25
mode, but commented it out for now. The TELNET code still
needs to be converted. IF you want to get this correct in
the UNIX version, it should be fixed because UNIX does not
know about "file modes" and always writes what you tell it
to write...
- BM file naming conventions have been changed to allow use of
the program on non-DOS environments, using the same approach
as in the NET program (871225 release). Module "files.c" is
now also used by BM, and in defines all filenames and
directory names used in the program. The bm_rc[] definition
has been added for this purpose. Please note, that
directory names also include the trailing \ or / character,
this is because the separator character used differs between
DOS, UNIX and Atari TOS. This also means that the syntax of
the "smtp" command in the BM.RC file has changed, it now
should also include the trailing separator. In fact, the
smtp command is not really necessary because the default
value is now equal to the value used by NET.
- DIRUTIL.C has been revised to run on both MS-DOS and Atari
TOS, and some cleanup has been done on the code. Now, it is
possible to define the character used to separate the digits
in large numbers, by compiling with -DTHSEP="'.'"
- BM now uses NET's version of DIRUTIL.C. This module could
be split up to avoid inclusion of directory print routines.
- An extra option has been added to BM.RC:
tz TIM
sets the timezone used in date/time strings produced by BM.
This was necessary because no standard way has been defined
to add values to the top-level environment of the ST
operating system, so the getenv() would always fail if you
started BM from the desktop. Now, you can define your local
timezone in BM.RC (should be 3 characters, e.g. GMT, WET).
- Changes were made to GLOBAL.H because of bugs in the Mark
Williams C compiler:
- the construct 'x >> 16' confuses the optimizer,
therefore the hiword define has been changed to a
function, and the shift is coded differently in this
function (atari.c)
- the compiler doesn't like void pointers to be further
typecasted. (as in: (struct mbuf **) (void *) 0)
therefore, the general purpose pointer has been changed
to char * type.
- STILL EXPERIMENTAL: Desktop accessory version
I'm working on a version of NET that can run as a desktop
accessory on the ST. The code is included with this
version, and can be comiled by defining the GEMDESK
preprocessor symbol. An entry in the makefile, NET.ACC,
provides for this. The resulting program still has some
problems. Be careful when running programs with NET.ACC in
the background...
The accessory version defines a win